﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SedionFormDesigner.Infrastructure
{
    /// <summary>
    ///  用来标志Name属性
    /// </summary>
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
    internal sealed class SedionDesignerName : Attribute
    {
        private Boolean designerName;

        public static SedionDesignerName Default = new SedionDesignerName(false);

        public SedionDesignerName()
            : this(false) { }

        public SedionDesignerName(Boolean designerName)
        {
            this.designerName = designerName;
        }

        public override bool Equals(object obj)
        {
            SedionDesignerName da = obj as SedionDesignerName;
            if (da == null)
                return false;

            return da.designerName == this.designerName;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}
